/* popup.css 优化布局 */
.container {
  width: 420px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.settings-panel {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-group {
  flex: 1;
  min-width: 0;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
  font-weight: 500;
}

.input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-picker {
  width: 40px;
  height: 30px;
  padding: 2px;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.font-size-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.unit {
  font-size: 14px;
  color: #666;
  white-space: nowrap;
}

#textInput {
  width: 100%;
  height: 50px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 15px 0;
  resize: vertical;
  font-family: inherit;
}

.primary-btn {
  width: 100%;
  padding: 12px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.primary-btn:hover {
  background: #2980b9;
}

.secondary-btn {
  width: 100%;
  padding: 12px;
  background: #f8f9fa;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-top: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}

.secondary-btn:hover {
  background: #e9ecef;
}

.preview-container {
  margin: 15px 0;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}

#canvas {
  width: 100%;
  height: auto;
  display: block;
}

/* 添加以下样式增强交互 */
.color-picker:focus,
.font-size-input:focus,
#textInput:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.icon-btn:hover {
  background: #f8f9fa;
}

.primary-btn:active {
  transform: translateY(1px);
}

#downloadBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#downloadBtn:disabled:hover {
  background: #f8f9fa;
}
.preview-container {
  position: relative;
}

.canvas-overlay {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  border: 2px dashed rgba(0, 0, 0, 0.1);
  width: 100%;
  height: 100%;
}
